package com.ovopark.firecar.recyclerview.delegate;


import androidx.annotation.LayoutRes;

import com.ovopark.firecar.recyclerview.viewholder.BaseRecyclerViewHolder;


/**
 * @author yuanwei
 */
public interface ItemViewDelegate<T> {

    /**
     * 返回layot资源id
     *
     * @return
     */
    @LayoutRes
    int getItemViewLayoutId();

    /**
     * 返回是否使用相应的布局
     *
     * @param item
     * @param position
     * @return
     */
    boolean isForViewType(T item, int position);

    /**
     * 数据的填充
     *
     * @param holder
     * @param t
     * @param position
     */
    void convert(BaseRecyclerViewHolder holder, T t, int position);

}
